Statements are instructions that specify how QA Wizard Pro interacts with the tested application. Functions are statements that return a value to a variable that can be passed to other statements. Some statements are automatically added during recording, but you can manually add other statements to create more powerful and flexible scripts.
1. Select the script line above where to add the statement.
2. Choose Script > Add Statement.
The Add Statement dialog box opens.
Tip: You can drag a statement from the Statements pane or controls from the Preview pane and Application Repository pane to open the Add Statement dialog box with the item selected.
3. Select the statement to add.
To exclude statements from the list, select a statement Category. You can also enter the first few letters of the statement name in the Filter field to display matching statements.
4. The Application/version field is automatically set with the context. This information is used to populate the Window and Control fields on the Add Statement dialog box with values from the application repository.
If QA Wizard Pro cannot identify the context, None is selected. This usually occurs when you add statements to a utility script that is only called by other scripts because the context is set in the script that calls it. If an application/version is required, select it from the list.
5. Enter the statement information. Required fields are indicated with
.
For some fields, you can indicate how to interpret the value you enter. You can use text, values, constants, datasheet values, script and repository variables, or functions depending on the field type.
Note: Screenshots are displayed when you add some statements. The screenshot is updated when you select the window and control to perform the statement on. Use the zoom buttons to zoom in, zoom out, or display the screenshot at actual size. Select Auto Fit to display the entire screenshot.
6. If you are adding a function, select an optional Output variable to assign the return value to.
The list includes script variables declared before the current line and repository variables for the application. To create a new variable, enter a variable name.
7. Enter an optional Comment, such as the purpose of the statement.
8. Click OK to add the statement to the script.